import { request }  from '@/axios/request'

//获取立案编码

export const CreateCode = () => {
    return request({
        url: '/UnFreezingApplication/CreateCode',
        method: 'get'
    })
}

//单个获取
export const GetOne = (parmas) => {
    return request({
        url: '/UnFreezingApplication/Get',
        method: 'get',
        data: {"Id": parmas}
    })
}

// 列表查询接口
export const GetList = (parmas) => {
    return request({
        url: '/UnFreezingApplication/EntityList',
        method: 'get',
        data: parmas
    });
}
//分页查询
export const GetListByPage = (parmas) => {
    return request({
        url: '/UnFreezingApplication/ListByPage',
        method: 'get',
        data: parmas
    });
}

export const Create = (parmas) => {
    //console.log('>>>>>>>>>UnFreezingApplicationAPICreate',parmas)
    return request({
        url: '/UnFreezingApplication/Create',
        method: 'post',
        data: parmas
    })
}

export const DeleteSingle = (parmas) => {
    return request({
        url: '/UnFreezingApplication/DeleteSingle',
        method: 'delete',
        data: { "Id": parmas }
    })
}

export const DeleteList = (parmas) => {
    return request({
        url: '/UnFreezingApplication/DeleteList',
        method: 'patch',
        data: JSON.stringify(parmas)
    })
}

//{ entity: this.UnFreezingApplication, Id: this.UnFreezingApplication.Id}
export const Update = (parmas) => {
    return request({
        url: '/UnFreezingApplication/Update',
        method: 'put',
        data: { "entity": parmas,"Id": parmas.Id}
    })
}